package com.example.graphicslib.animations;

/**
 * Created by Tatev on 24/4/2014.
 */
public class BaseMovementFrameAnimation extends BaseMovementAnimation implements Framable{

    public BaseMovementFrameAnimation(float startX, float startY, long duration, int maxFrameCount) {
        //movementAnimation = new BaseMovementAnimation(startX, startY, duration);
        super(startX, startY, duration);
        frameAnimation = new BaseFrameAnimation(maxFrameCount, duration);
    }

    @Override
    public void setFps(int fps) {
        frameAnimation.setFps(fps);
    }

    @Override
    public int getCurrentFrame() {
        return frameAnimation.getCurrentFrame();
    }

    @Override
    public void onTickResponse(long elapsedTime) {
        super.onTickResponse(elapsedTime);
        frameAnimation.onTickResponse(elapsedTime);
    }

    private BaseFrameAnimation frameAnimation;
    //private BaseMovementAnimation movementAnimation;
}
